projects
/
project
/
odhcp6c.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5212a10
)
odhcp6c: reset res variable on INIT state
author
Alvaro Fernandez Rojas
<
[email protected]
>
Wed, 17 Dec 2025 07:52:47 +0000
(08:52 +0100)
committer
Alvaro Fernandez Rojas
<
[email protected]
>
Wed, 17 Dec 2025 07:52:47 +0000
(08:52 +0100)
res variable is used on multiple states and it can be modified from the
default value during the argument parsing, so it should be properly reset
at INIT state.
Signed-off-by: Alvaro Fernandez Rojas <
[email protected]
>
src/odhcp6c.c
patch
|
blob
|
history
diff --git
a/src/odhcp6c.c
b/src/odhcp6c.c
index d859e9020635bc9eedb81b07c3a8c02569e36ee0..123d9d3767fcdaa1eb5d15e02f4827ff37616c2c 100644
(file)
--- a/
src/odhcp6c.c
+++ b/
src/odhcp6c.c
@@
-518,6
+518,7
@@
int main(_o_unused int argc, char* const argv[])
odhcp6c_clear_state(STATE_SIP_FQDN);
odhcp6c_clear_state(STATE_CAPT_PORT_DHCPV6);
bound = false;
+ res = -1;
size_t oro_len = 0;
odhcp6c_get_state(STATE_ORO, &oro_len);